object ConstructorDemo03 {
  def main (args: Array[String]): Unit = {
    val person = new PersonT("jack")
    person.showInfo()
  }

  class PersonT private(){
    var name: String = _
    var age : Int = _
    def this(name:String){
      this()
      this.name = name
    }
    def this(name: String ,age: Int){
      this()
      this.name = name
      this.age = age

    }
    def this(age: Int){
      this("匿名")
      this.age = age
    }

    def showInfo(): Unit = {
      println("PersonT 信息如下: ")
        println ("name=" + this.name)
        println ("age=" + this.age)
    }
  }

}
